using System.Collections.Generic;
using CodePlex.TfsLibrary.ObjectModel;

namespace CodePlex.CodePlexClientLibrary
{
    public class StubStatusView : IStatusView
    {
        public bool DisplayError__Called = false;
        public SourceItemResult DisplayError__Result;
        public string DisplayError_Path;
        public List<SourceItem> DisplayItem__Items = new List<SourceItem>();
        public bool DisplayNoItemsMessage__Called;
        public bool QueryForResolve__Result = true;
        public string QueryForResolve_Filename;
        public string RemoveItem_LocalPath;
        public bool Run__Called;
        public bool ShowView__Called;
        public bool ShowView__Result = false;

        public void DisplayError(string path,
                                 SourceItemResult result)
        {
            DisplayError__Called = true;

            DisplayError_Path = path;
            DisplayError__Result = result;
        }

        public void DisplayItem(SourceItem item)
        {
            DisplayItem__Items.Add(item);
        }

        public void DisplayNoItemsMessage()
        {
            DisplayNoItemsMessage__Called = true;
        }

        public bool QueryForResolve(string filename)
        {
            QueryForResolve_Filename = filename;

            return QueryForResolve__Result;
        }

        public void RemoveItem(string localPath)
        {
            RemoveItem_LocalPath = localPath;
        }

        public void Run()
        {
            Run__Called = true;
        }

        public virtual bool ShowView()
        {
            ShowView__Called = true;

            return ShowView__Result;
        }
    }
}